package com.wnxy.sddfp.trade.controller;

import com.wnxy.sddfp.common.model.dto.bid.AgencyBidDTO;
import com.wnxy.sddfp.common.model.vo.bid.AgencyBidVo;
import com.wnxy.sddfp.common.result.Result;
import com.wnxy.sddfp.trade.service.IAgencyBidService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * 投资机构投资申购表
 */
@RestController
@Api(tags = "投资机构投资申购表")
public class AgencyBidController {

    @Autowired
    private IAgencyBidService agencyBidService;

    /**
     * 机构投资认购
     */
    @ApiOperation("投资机构认购")
    @PostMapping("/trade/agency/bid/add")
    public Result<AgencyBidVo> addAgencyBid(
            @RequestBody AgencyBidDTO agencyBidDTO) {
        AgencyBidVo agencyBidVo=agencyBidService.addAgencyBidRecord(agencyBidDTO);
        return Result.ok(agencyBidVo);
    }
}